<?php


    if(isset($_POST['links'])){

        $anz = preg_match_all("!(http://.*?)\"!s", stripslashes($_POST['links']), $output);
        
        for($i=0; $i < $anz; $i++){
            echo $output[1][$i] . "<br>";
        }
    } else {
?>
         <FORM action="index.php" method="post">
        	<textarea rows="3" name="links"></textarea><br>
        	<input type="submit">
         </FORM>
<?php    
    }


?>